<template>
  <div class="grandSon">
    我是孙子组件
    <p>从爷爷组件拿过啦的数据</p>
    <span>{{ username }}</span>
    <span>{{ car.brand }}</span>
    <span>{{ hobby.join('、') }}</span>
  </div>
</template>

<script>
export default {
  inject:['username','car','hobby']
}
</script>

<style scoped>
.grandSon{
  
  margin: 5px 5px;
  
  background-color: yellowgreen;
 
  border-radius: 10px;
}
</style>